package com.zjs.db.affair.Service;

import com.util.result.Message;
import com.zjs.db.affair.domain.AOrder;
import com.zjs.db.affair.mapper.AMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;

/**
 * 描述
 *
 * @author zhu
 * @version 1.0
 * @date 2021/6/24 16:01
 */
@Slf4j
@Service
@Transactional
public class AServiceImpl {

    @Resource
    private BServiceImpl bService;

    @Resource
    private AMapper mapper;

    public Message aService() {
        log.info("开始执行A方法");
        String currentTime = new Date().toString();
        AOrder order = mapper.selectOrderByOrderNo("A100");
//        order.setUpdateTime(currentTime);
//        mapper.updateOrderData(order);
        bService.bService(currentTime);
        log.info("结束执行A方法");
        return Message.success();
    }
}
